home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / frac.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  45 lines

  1. Author: Dave Vomocil 
  2.  
  3. The attached programs can be used to turn your HP48SX into a four function 
  4. RPN machine that handles fractions graphically.  That is, you will be able 
  5. perform computations on mixed numbers the way you did in grade school.  The 
  6. pieces (i.e. files/programs) you need are: 
  7.  
  8. GCD  computes greatest common divisor 
  9. LCM  computes least common multiple 
  10. PLUS used to add two mixed numbers 
  11. SUBTR  used to subtract two mixed numbers 
  12. MULTI  used to multiply two mixed numbers 
  13. DIVI used to divide two mixed numbers 
  14. DPLAY  used to display a mixed number 
  15. SWAPR  used to 'swap' two mixed numbers on the stack 
  16. DISPL  common display code used by DPLAY, PLUS, SUBTR, etc. 
  17. ADD$ common arithmetic code used by PLUS and SUBTR. 
  18.  
  19. KEYS this is a list you can hand to STOK to assign values to your 'user' 
  20. keys. 
  21.  
  22. How to do fractions: 
  23. The software looks to the stack for arguments.  It uses three levels to 
  24. define a mixed number.  It wants the whole number in level three, the 
  25. numerator in level two, and the denominator in level one. 
  26.  
  27. The operators '+', '-', '*', '/' and 'swap' expect two mixed numbers on the 
  28. stack.  The arithmetic operators leave only the result on the stack. 
  29.  
  30. The <left shift> <review> operator displays the mixed number in levels 1, 
  31. 2, & 3; and leaves it the stack unchanged. 
  32.  
  33. Example: 
  34.  
  35. Press:  1 <spc> 2 <spc> 3 <enter> <left shift> <review>; see one and two 
  36. thirds displayed.  Then press 4 <spc> 5 <spc> 6 + ; see one and two thirds 
  37. plus four and five sixths equals six and one half. 
  38.  
  39. Bugs: 
  40. The whole number must be positive.  The software does not handle a negative 
  41. mixed number correctly.  For example, it says six and one half plus a 
  42. negative three and on half equals four. 
  43.  
  44. by dave vomocil 
  45.